﻿using System.Net.DnsToolkit.Packet;
using System.Net.DnsToolkit.Packet.Records;
using System.Net.DnsToolkit.Serializer.Stream.Extension;
using System.Net.DnsToolkit.Serializer.Stream.Compression;

namespace System.Net.DnsToolkit.Serializer.Stream.Writer.Record {
    public class RecordAAAAWriter : IRecordWriter<System.IO.Stream> 
    {
    
        public QTypeEnum QTypeEnum { get { return QTypeEnum.AAAA; } }

        public void Write(IRecord record, System.IO.Stream destination, ICompressionContext compression) {

            var aaaa = (IRecordAAAA)record;
            if (compression == null) { /* do nothing */
            }
            destination.WriteIPv6(aaaa.Address);
        }


    }
}
